﻿Public Class frmDefaultList
    Dim dbCustomer As New dbCustomer
    Dim dbSales As New dbSales
    Dim dbGL As New dbGL
    Dim dbFormula As New dbFormula
    Dim dbMasterTable As New dbMasterTable
    Dim dbPriceCalc As New dbPriceCalc
    Dim dbProductionPriceStock As New dbProductionPriceStock
    Dim dbStock As New dbStock
    Dim dbStockCard As New dbStockCard
    Dim dbSystem As New dbSystem
    Dim frmCtrl As New FormControl
    Dim Var As New varDeclare
    Dim dsBase As DataSet
    Public ListType As String

    Private Sub frmDefaultList_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Dim key As String = ""
        Dim Header As String = ""
        Select Case ListType
            Case "ChartOfAccount"
                dsBase = dbGL.ListMasterChartOfAccount("= GLAC_LEVEL")
                key = "GL Account ID"
                Header = "Chart of Account"
        End Select
        ToolbarHeader1.Iniliaze("LIST : " & Header, Me, Nothing, GridAndFind1.getDataGridView(), key)
        GridAndFind1.Initialize(dsBase, key, ToolbarHeader1, Me, True)
        ToolbarHeader1.ActionCtrl(False, False, False, False, True, False, False, True, True)
    End Sub

    Private Sub tsPrint_Click(ByVal sender As Object) Handles ToolbarHeader1.tsPrintClick
        Select Case ListType
            Case ""

        End Select
    End Sub

    Private Sub tsRefresh_Click(ByVal sender As Object) Handles ToolbarHeader1.tsRefreshClick
        Dim frm As New frmDefaultList
        frm.ListType = ListType
        frmCtrl.openChild(frm, Me.ParentForm)
    End Sub
End Class